package com.fanqiechaodan.factory.simple;

import com.fanqiechaodan.factory.simple.factory.SimpleFactory;
import com.fanqiechaodan.factory.simple.product.Product;

/**
 * @author fanqiechaodan
 * @Classname Demo
 * @Description 简单工厂模式
 */
public class Demo {

    public static void main(String[] args) {
        Product productA = SimpleFactory.createProduct("A");
        productA.use();

        Product productB = SimpleFactory.createProduct("B");
        productB.use();

        Product productC = SimpleFactory.createProduct("C");
        productC.use();

        Product productD = SimpleFactory.createProduct("D");
        productD.use();
    }
}
